package com.hdax.dmw.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdax.dmw.base.DmImage;
import com.hdax.dmw.base.mappers.DmImageMapper;
import com.hdax.dmw.base.service.DmImageService;
import org.springframework.stereotype.Service;

@Service
public class DmImageServiceImpl extends ServiceImpl<DmImageMapper, DmImage> implements DmImageService {
    @Override
    public DmImage getImage(Long targetId, Integer type, Integer category) {
        QueryWrapper<DmImage> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("targetId",targetId);
        queryWrapper.eq("type",type);
        queryWrapper.eq("category",category);
        return getOne(queryWrapper);
    }
}
